<template>
  <div class="mobilemenu">
    <div class="dswd-m-container">
      <ul class="menu-wrap">
        <template v-for="item of menuData">
          <li :key="item.id" class="menu-item" @click="menuChange(item)">
            <div class="menu-name">{{ item.name }}</div>
            <div class="direct-icon">></div>
          </li>
        </template>
      </ul>
    </div>
  </div>
</template>

<script>
export default {
  components: {},
  data() {
    return {
      currentPath: this.activePath
    }
  },
  props: {
    menuData: {
      type: Array,
      default: () => []
    },
    activePath: {
      type: String,
      default: () => null
    }
  },
  methods: {
    menuChange(item) {
      this.$emit('menuChange', item)
    }
  }
}
</script>

<style lang="scss" scoped>
.mobilemenu {
  .menu-wrap{
    .menu-item{
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 18px 0;
      border-bottom: 1px solid #E9E9E9;
      cursor: pointer;
      .menu-name{
        font-size: 14px;
        font-weight: 500;
        color: #222222;
        line-height: 26px;
      }
      .direct-icon{
        font-size: 14px;
        font-weight: 500;
        color: #222222;
        line-height: 26px;
      }
    }
  }
}
</style>
